<template>
  <div class="main-header">
    <div class="menu-icon">
      <el-icon size="28px" @click="handleMenuClick">
        <!-- <Fold /> -->
        <component :is="isFold ? 'Expand' : 'Fold'"></component>
      </el-icon>
    </div>
    <div class="content">
      <headerCrumb />
      <div class="info">
        <HeaderInfo />
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import HeaderInfo from './c-cpns/header-info.vue'
import headerCrumb from './c-cpns/header-crumb.vue'
const emit = defineEmits(['foldChange'])
const isFold = ref(false)
function handleMenuClick() {
  isFold.value = !isFold.value

  emit('foldChange', isFold.value)
}
</script>

<style lang="less" scoped>
.main-header {
  height: 100%;
  display: flex;
  flex: 1;
  align-items: center;

  .menu-icon {
    display: flex;
    align-items: center;
    cursor: pointer;
  }
  .content {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
  }
}
</style>
